package com.zlfund.cat.zjgsmk.net;

import com.zlfund.cat.zjgsmk.api.ZjgsmkService;
import com.zlfund.cat.zjgsmk.bean.BaseBean;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by chenj
 * Created on 2017/8/22
 */

public class RetrofitQueryMapRequest<T extends BaseBean> extends BaseRequest<T> {
    private Map<String,String> mMap;

    public RetrofitQueryMapRequest(){
        mMap = new HashMap<>();
    }

    public RetrofitQueryMapRequest addParams(String key,String value){
        mMap.put(key, value);
        return this;
    }


    public <S> RequestCall<T,S> build(Class<S> serviceClass){
        Class[] clazzes = new Class[]{Map.class,};
        Object[] args = new Object[]{mMap};
        return new RequestCall<>(serviceClass, args,clazzes);
    }
}
